package org.csu.backofficemanagersys.service;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import org.csu.backofficemanagersys.domain.AccountLog;
import org.csu.backofficemanagersys.mapper.AccountLogMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class AccountLogService {
    @Autowired
    private AccountLogMapper accountLogMapper;
    public List<AccountLog> getAccountLog(){
        return accountLogMapper.selectList(null);
    }
    public List<AccountLog> getAccountLogByName(String userid){
        QueryWrapper<AccountLog> queryWrapper = new QueryWrapper<>();
        queryWrapper.eq("userid",userid);
        return accountLogMapper.selectList(queryWrapper);
    }
    public List<AccountLog> findAccountLogLike(String key){
        QueryWrapper<AccountLog> queryWrapper = new QueryWrapper<>();
        queryWrapper.like("userid",key);
        return accountLogMapper.selectList(queryWrapper);
    }
}
